Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Howard Fezboosimanjip 16.Jan.04 07:29 PM a Web browser
Domino Server 6.0.2 CF2 Windows 2000


I am trying to update a backend MS SQL Server via the "WebQuerySave" event of the 'form' using the following agent. I am getting the following error on the console:

"Operation is disallowed in this session"

It is breaking at

'Set cn=createobject("ADODB.Connection")'

The code is working fine if I try to run it via notes client. But it is failing via browser. What additional settings do I need for the ADODB to work via web.

*********************
Sub Initialize
Dim session As NotesSession
Dim doc As NotesDocument
Set session = New NotesSession
Set doc = session.DocumentContext
Dim Connect As Variant
Dim RecordSet As Variant
Dim Qry As String
Dim cn As Variant

Print "test 1"
Set cn=createobject("ADODB.Connection")
Print "test 1"

cn.Open "DRIVER={SQL Server};SERVER=DEV;database=Prod;UID=dev;PWD=password"
Qry = |Select * from web_stat|
Set RecordSet = CreateObject("ADODB.Recordset")
RecordSet.Open Qry,cn,2,1
RecordSet.MoveFirst
For i = 1 To 10
Print Cstr(i) & " --> " & RecordSet.Fields("file_accessed").Value
RecordSet.MoveNext
Next
RecordSet.close

strSQL = "exec file_tacker"

cn.Execute (strSQL)
cn.close
End Sub
****************






Notes Access to MS SQL Server via W... (~Howard Fezboos... 16.Jan.04)
. . Read up on Agent Security. The sign... (~Dan Elhipister... 16.Jan.04)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS